﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Oroboros.Objects;

namespace Save_Editor.Controls
{
    /// <summary>
    /// Interaction logic for ctrlPositionData.xaml
    /// </summary>
    public partial class ctrlPositionData : UserControl
    {
        public ctrlPositionData()
        {
            this.DataContextChanged += new DependencyPropertyChangedEventHandler(ctrlPositionData_DataContextChanged);
            InitializeComponent();
        }

        void ctrlPositionData_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            if (e.NewValue.GetType() == typeof(Microsoft.Xna.Framework.Vector3))
            {
                Microsoft.Xna.Framework.Vector3 v = (Microsoft.Xna.Framework.Vector3)e.NewValue;
                theGrid.DataContext = new Vector3Wrapper(v);
            }
        }
    }
}
